<?php
session_start();
$_SESSION['uname']="houdunwang";
function toUpper($data){
	return "<i style=
	'color:#f00;'>$data</i>";
}
function substr_d($data,$start,$num){
	return substr($data,$start,$num);
}
define("APP","后盾远程1班学习系统");
include "./libs/Smarty.class.php";
$smarty = new Smarty();
// var_dump($smarty);
$smarty->template_dir = "tpl";//模版目录
$smarty->compile_dir = "compile";//编译目录
$smarty->cache_dir="cache";//缓存目录
$smarty->left_delimiter="{hd:";//左边界符
$smarty->right_delimiter="}";//右边界符
$smarty->assign("age",110);
$smarty->assign("hello","后盾网");
$smarty->assign("webname",array("name"=>array("tel"=>64825057,"email"=>"houdunwangxj@gmail.com"),"url"=>"houdunwang.com"));
// $smarty->display("index.html");
$data=array(
	array(
		"name"=>"刘德华",
		"age"=>33
	),
	array(
		"name"=>"郭富城",
		"age"=>29
	)
);
$smarty->assign("data",$data);
$smarty->display("db.html");
?>